@extends('layouts.master')

@section('title')
    管理员模块——木投网商城管理后台
@stop

@section('app_css')
    <link href="/resource/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="/resource/css/style.css">
    <link rel="stylesheet" href="/resource/css/dataTables.bootstrap.css">
    <link rel="stylesheet" href="/resource/css/bootstrap-switch.min.css">
    <link rel="stylesheet" href="/resource/css/fileinput.min.css">
@stop

@section('app_js')
    <script src="/resource/js/jquery-1.11.3.min.js"></script>
    <script src="/resource/js/bootstrap.min.js"></script>
    <script src="/resource/js/jquery.twbsPagination.js"></script>
    <script src="/resource/js/bootstrap-switch.min.js"></script>
    <script src="/resource/js/date.js"></script>
    <script src="/resource/js/highlight.js"></script>
    <script src="/resource/js/main.js"></script>
    <script src="/resource/js/fileinput.min.js"></script>
    <script src="/resource/js/fileinput_locale_zh.js"></script>
@stop


@section('content')
    @include('common.nav')
<div class="container-fluid">
    <div class="row" id="navLeft">
        @include('common.admin_nav')
        <div class="col-lg-10">
            <div class="navbottom">
                <span>您的位置：</span>其他 > 管理员
            </div>
            <div class="contentNav">
                <ul>
                    <li>管理员</li>
                    <li class="btn btn-default"><a href="/show_list">列表</a></li>
                    <li class="btn btn-default active"><a href="/add_admin">新增</a></li>
                </ul>
            </div>
            {{ Form::open(['url'=>'/edit_admin']) }}
            <div class="contentMember_new">
                <table class="table table-hover">
                    <tbody>
                    <tr>
                        <th>管理员</th>
                    </tr>
                    <tr class="newBorder_top">
                        <th><input type="text" class="input-small form-control" style="width:260px" name="name" value="{{ $admin->name }}"></th>
                    </tr>
                    <tr>
                        <th>名字</th>
                    </tr>
                    <tr class="newBorder_top">
                        <th>
                            <input type="text" class="input-small form-control" style="width:260px;float:left;" placeholder="" name="real_name" value="{{ $admin->real_name }}">
                        </th>
                    </tr>
                    <tr>
                        <th>密码</th>
                    </tr>
                    <tr class="newBorder_top">
                        <th>
                            <input type="text" class="input-small form-control" style="width:260px;float:left;" placeholder="" name="password" value="{{ $admin->password }}">
                        </th>
                    </tr>
                    <tr>
                        <th>头像</th>
                    </tr>
                    <tr class="newBorder_top">
                        <th>
                            <input id="input-id" type="file" class="file" data-preview-file-type="text" name="avatar" value="{{ $admin->avatar }}">
                        </th>
                    </tr>
                    <tr>
                        <th>角色</th>
                    </tr>
                    <tr class="newBorder_top">
                        <th>
                            <input type="text" class="input-small form-control" style="width:260px;float:left;" placeholder="" name="role_id" value="{{ $admin->role_id }}">
                        </th>
                    </tr>
                    <tr>
                        <th>联系方式</th>
                    </tr>
                    <tr class="newBorder_top">
                        <th>
                            <input type="text" class="input-small form-control" style="width:260px;float:left;" placeholder="" name="mobile" value="{{ $admin->mobile }}">
                        </th>
                    </tr>
                    <tr>
                        <th>状态</th>
                    </tr>
                    <tr class="newBorder_top">
                        <th>
                            <input type="radio" value="1" name="status" @if($admin->status == 1) checked @endif >正常
                            <input type="radio" value="0" name="status" @if($admin->status == 0) checked @endif >禁用
                        </th>
                    </tr>

                    </tbody>
                </table>
                <button type="submit" class="btn btn-default">提交</button>
                <input type="hidden" name="id" value="{{ $admin->id }}">
            </div>
            {{ Form::close() }}
        </div>
    </div>
</div>
@stop
